package com.ws.lv.service.impl;

import com.ws.lv.bean.Acl_user;
import com.ws.lv.mapper.Acl_userMapper;
import com.ws.lv.service.Acl_userService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class Acl_userServiceImpl implements Acl_userService {
    @Autowired
    Acl_userMapper acl_userMapper;

    @Override
    public int insertAcl_user(Acl_user acl_user) {
        return acl_userMapper.insertAcl_user(acl_user);
    }

    @Override
    public Acl_user selectAcl_userByUsername(String username) {
        return acl_userMapper.selectAcl_userByUsername(username);
    }

    @Override
    public List<Acl_user> selectAcl_users(String username, Integer is_deleted, Integer sid) {
        return acl_userMapper.selectAcl_users(username,is_deleted,sid);
    }

    @Override
    public int softUpdateAcl_user(int user_id) {
        return acl_userMapper.softUpdateAcl_user(user_id);
    }

    @Override
    public Acl_user selectAcl_userById(int user_id) {
        return acl_userMapper.selectAcl_userById(user_id);
    }

    @Override
    public int updateAcl_user(Acl_user acl_user) {
        return acl_userMapper.updateAcl_user(acl_user);
    }

    @Override
    public int deleteAcl_users(ArrayList<Integer> user_ids) {
        return acl_userMapper.deleteAcl_users(user_ids);
    }

    @Override
    public int updateAcl_userPassword(int user_id,String newPassword) {
        return acl_userMapper.updateAcl_userPassword(user_id,newPassword);
    }

    @Override
    public int insertAcl_user_role(int user_id, int role_id) {
        return acl_userMapper.insertAcl_user_role(user_id,role_id);
    }

    @Override
    public int deleteAcl_user_role(int user_id) {
        return acl_userMapper.deleteAcl_user_role(user_id);
    }

    @Override
    public List<Acl_user> selectAcl_usersBySupplierId(int supplierId) {
        return acl_userMapper.selectAcl_usersBySupplierId(supplierId);
    }


}
